<?php
/**
 * Parcl
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://parcl.com/license
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@parcl.com so we can send you a copy immediately.
 *
 * @category parcl
 * @package parcl-core
 * @copyright Copyright (c) 2006-2011 Mikael Knutsson (http://mikn.me)
 * @license http://parcl.com/license New BSD License
 */

if(PARCL_EXEC !== 1) {
    die('<h1>Incorrect Access</h1>You cannot access this file directly.<br/>' .
        'If you got this error message by clicking a link on the site,' .
        ' please notify the webmaster as soon as possible.');
}

/**
 * Singleton interface, using this to enforce the same function name for all
 * singletons created in Parcl.
 * @todo Expand the interface collection.
 */

interface ISingleton {
    public static function GetInstance();
}

interface IModule {
    public function SetArg($arg);
    public function Execute(Registry $registry);
}

/**
 * The args received contains an 'logEntries' array. This needs to be emptied
 * after they have been written to the log.
 */
interface ILogging {
	public static function OnMessageReceived($sender, $args);
}

interface ISessionHandler {
	public function Open($savePath, $sessionName);
	public function Read($sessionID);
	public function Write($sessionID, $sessionData);
	public function Close();
	public function Destroy($sessionID);
	public function GarbageCollect($maxLifeTime);
}